---
apiVersion: v1
kind: Service
metadata:
  name: application2
spec:
  ports:
    - port: 5000
      targetPort: http
      protocol: TCP
  selector:
    app: application2
    version: v0.0.2
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: &app application2
spec:
  selector:
    matchLabels:
      app: *app
      version: v0.0.2
  template:
    metadata:
      labels:
        app: *app
        version: v0.0.2
    spec:
      containers:
        - name: *app
          image: bigkaa/application2:v0.0.2
          ports:
            - containerPort: 5000
              name: http
              protocol: TCP
          env:
            - name: OTEL_EXPORTER_JAEGER_AGENT_HOST
              valueFrom:
                fieldRef:
                  fieldPath: status.hostIP
            - name: OTEL_EXPORTER_JAEGER_AGENT_PORT
              value: "6831"
